taxi = taxi || {};

taxi.GoogleMapsUtils = function() {

}

taxi.GoogleMapsUtils.prototype.toLatLng = function(point) {
	return new google.maps.LatLng(point[0],point[1]);
}

taxi.GoogleMapsUtils.prototype.toBounds = function(boundaries){
	var cleanBoundaries = [ 
	                        [Math.min(boundaries[0][0],boundaries[1][0]),Math.min(boundaries[0][1],boundaries[1][1])],
    						[Math.max(boundaries[0][0],boundaries[1][0]),Math.max(boundaries[0][1],boundaries[1][1])]
	                      ]; 
	
	return new google.maps.LatLngBounds(
		this.toLatLng([cleanBoundaries[0][0],cleanBoundaries[0][1]]),
		this.toLatLng([cleanBoundaries[1][0],cleanBoundaries[1][1]])
	);
}